<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <foreach name="result" item="res">
            <if condition="$res['option_name'] eq $type">
                <li class="active"><a href="#A" data-toggle="tab">{$res.name}</a></li>
                <else/>
                <li><a href="{:url('setting/agreement',array('type'=>$res['option_name']))}">{$res.name}</a></li>
            </if>
        </foreach>
    </ul>
    <form class="form-horizontal js-ajax-form margin-top-20" role="form" action="{:url('setting/agreement')}"
          method="post">
        <fieldset>
            <input type="hidden" name="type" value="{$type}">
            <div class="form-group">
                <label  class="col-sm-2 control-label">内容</label>
                <div class="col-md-6 col-sm-10">
                    <script type="text/plain" id="content" name="content">{$content.option_value}</script>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="submit" class="btn btn-primary js-ajax-submit" data-refresh="0">
                        {:lang('SAVE')}
                    </button>
                </div>
            </div>
        </fieldset>
    </form>

</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
    //编辑器路径定义
    var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
    $(function () {

        editorcontent = new baidu.editor.ui.Editor();
        editorcontent.render('content');
        try {
            editorcontent.sync();
        } catch (err) {
        }
    });
</script>
</body>
</html>
